<?php
$db['merchant_info'] = array(
    'columns' => array(
        'merchant_info_id' =>array(
            'type' => 'number',
            'pkey' => true,
            'extra' => 'auto_increment',
            'label' => ('商家信息ID') ,
            'in_list' => true,
            'default_in_list' => true,
        ),
        'merchant_id' => array(
            'type' => 'table:merchant',
            'label' => ('商家ID') ,
            'in_list' => true,
            'default_in_list' => true,
        ),
        'number' =>array(
            'type' => 'varchar(255)',
            'label' => ('商家编号') ,
            'in_list' => true,
            'default_in_list' => true,
        ),
        'type' =>array(
            'type' => 'varchar(255)',
            'label' => ('商家类型') ,
            'in_list' => true,
            'default_in_list' => true,
            'filtertype' => 'yes',
        ),
        'company_name' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '公司名称',
            'is_title' =>true,
            'filtertype' => 'yes',
            'searchtype' => 'has',
        ),
        'name' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '联系人姓名',
            'filtertype' => 'yes',
        ),
        'mobile' => array(
            'type'=>'char(11)',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '联系人手机',
            'filtertype' => 'yes',
        ),
        'tel' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '公司电话',
            'filtertype' => 'yes',
        ),
        'address' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '联系地址',
        ),
        'email' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '联系邮箱',
        ),
        'business_license' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '营业执照编号',
            'filtertype' => 'yes',
        ),
        'legal_person' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '法定代表人姓名',
            'filtertype' => 'yes',
        ),
        'legal_person_id' => array(
            'type'=>'varchar(18)',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '法人身份证号码',
            'filtertype' => 'yes',
        ),
        'register_address' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '注册所在地',
        ),
        'cr_time' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'default' => '',
            'label' => '成立时间',
        ),
        'business_from_time' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'default' => null,
            'label' => '营业期限开始',
        ),
        'business_to_time' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'default' => null,
            'label' => '营业期限结束',
        ),
        'register_capital' => array(
            'type'=>'int(11)',
            'default_in_list' => true,
            'in_list' => true,
            'default' => null,
            'label' => '注册资本',
        ),
        'manage_range' => array(
            'type'=>'text',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '经营范围',
            'filtertype' => 'yes',
        ),
        'business_code' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '统一社会信用代码',
        ),
        'organization_code' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '组织机构代码',
        ),
        'organization_from_time' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'default' => null,
            'label' => '组织机构代码证有效期开始',
        ),
        'organization_to_time' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'default' => null,
            'label' => '组织机构代码证有效期结束',
        ),
        'invoice' => array(
            'type' => 'bool',
            'default' => 'true',
            'required' => true,
            'label' => ('支持开发票') ,
            'filtertype' => 'yes',
            'default_in_list' => true,
            'in_list' => true,
        ) ,
        'invoice_type' => array(
            'type' => array(
                'true' => ('区块链发票'),
                'false' => ('普通发票')
            ),
            'default' => 'false',
            'filtertype' => 'normal',
            'label' => ('发票类型') ,
            'default_in_list' => true,
            'in_list' => true,
        ) ,
        'ratepayer_identify' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '纳税人识别号',
        ),
        'ratepayer_name' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '纳税人识名称',
        ),
        'ratepayer_tax' => array(
            'type'=> array(
                '0' => '3',
                '1' => '6',
                '2' => '9',
            ),
            'default_in_list' => true,
            'in_list' => true,
            'default' => '0',
            'label' => '类型税码',
        ),
        'ratepayer_type' => array(
            'type'=> array(
                '0' => '小规模纳税人',
                '1' => '一般纳税人',
            ),
            'default_in_list' => true,
            'in_list' => true,
            'default' => '0',
            'label' => '纳税人类型',
        ),
        'ratepayer_city' => array(
            'type'=>'region',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '公司所在地区',
        ),
        'ratepayer_address' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '详细地址',
        ),

        'bank' => array(
            'type'=>'varchar(30)',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '开户行支行名称',
        ),
        'account_name' => array(
            'type'=>'varchar(30)',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '银行开户名称',
        ),
        'account' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '银行账号',
        ),
        'account_type' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '账户类型',
        ),
        'account_addr' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '开户地址',
        ),
        'account_mobile' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '开户手机号',
        ),
        'line_number' => array(
            'type'=>'varchar(255)',
            'default_in_list' => true,
            'in_list' => true,
            'label' => '开户行支行联行号',
        ),
        'time' => array(
            'type' => 'time',
            'label' => '申请时间',
            'in_list' => true,
            'default' => null,
        ),
        'dis_score' => array(
            'type' => 'bool',
            'default' => 'true',
            'required' => true,
            'label' => ('是否显示信用分') ,
            'filtertype' => 'yes',
            'default_in_list' => true,
            'in_list' => true,
        ) ,
        'score' => array(
            'type'=>'decimal(3,1)',
            'default'=>null,
            'label'=>'平均分数'
        ),
        'normative_score' => array(
            'type'=>'decimal(3,1)',
            'default'=>null,
            'label'=>'规范指数'
        ),
        'quality_score' => array(
            'type'=>'decimal(3,1)',
            'default'=>null,
            'label'=>'品质指数'
        ),
        'service_score' => array(
            'type'=>'decimal(3,1)',
            'default'=>null,
            'label'=>'体验指数'
        ),
    ),
    'comment' => '商家信息',
);

?>